import 'package:rjpb/utils/http_util.dart';
import 'package:rjpb/config/config.dart';

class LoginApi {
  static Future<Map<String, dynamic>?> login(
      String username, String password) async {
    final url = "$baseUrl/auth/login";
    try {
      final response = await HttpUtil().post(
        url,
        data: {
          'username': username,
          'password': password,
          'code': "0000",
        },
      );
      return response;
    } catch (e) {
      print("登录接口请求失败: $e");
      return null;
    }
  }
}
